package com.xyb.controller;

import com.xyb.entity.CourseDetail;
import com.xyb.service.WebCourseDetailService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("web/course-detail")
public class WebCourseDetailController {
    @Resource
    private WebCourseDetailService webCourseDetailService;

    @GetMapping("{courseDetailId}")
    public CourseDetail getCourseDetailByCourseDetailId(@PathVariable("courseDetailId")Long courseDetailId) {
        return webCourseDetailService.getCourseDetailByCourseDetailId(courseDetailId);
    }
}
